Don't draw to unviewable windows
authorAlexander Larsson <alexl@redhat.com>
Fri, 10 Jul 2009 22:28:18 +0000 (00:28 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 10 Jul 2009 22:33:52 +0000 (00:33 +0200)
The scrolling and region moving code needs to avoid drawing when the
window is mapped, which it did. However, it also needs to avoid
drawing when any of its parents are not mapped, which it didn't so
switch to using gdk_window_is_viewable().

This fixes the index rendering in evolution (#588169)

gdk/gdkwindow.c

index dd7df890f9e1dfc2f9d8a2a0ef3acc75e48fbac2..c601ec8d03d4d9fd8b5d10d777cc287deadcee6c 100644 (file)
@@ -6256,7 +6256,7 @@ gdk_window_move_resize_toplevel (GdkWindow *window,
 
   is_resize = (width != -1) || (height != -1);
 
-  if (GDK_WINDOW_IS_MAPPED (window) &&
+  if (gdk_window_is_viewable (window) &&
       !private->input_only)
     {
       expose = TRUE;
@@ -6405,7 +6405,7 @@ gdk_window_move_resize_internal (GdkWindow *window,
   old_x = private->x;
   old_y = private->y;
 
-  if (GDK_WINDOW_IS_MAPPED (window) &&
+  if (gdk_window_is_viewable (window) &&
       !private->input_only)
     {
       expose = TRUE;